from django.conf.urls.defaults import *
from main.views import index, to_index
from django.conf import settings
from django.contrib.auth.views import login, logout, logout_then_login

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
	(r'^stealth/', include('stealth.main.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
	(r'^admin/', include(admin.site.urls)),
	(r'^$', index),
	(r'^static/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.STATIC_ROOT}),
	(r'^accounts/login/$', login),
	(r'^accounts/profile/$', to_index),
	(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login', {'login_url': '/'}),
	(r'^grappelli/', include('grappelli.urls')),

)
